package com.chenfan.mcn.dao;

import com.chenfan.common.extension.mybatisplus.enhanced.EnhancedBaseMapper;
import com.chenfan.mcn.model.StarContractDetail;
import com.chenfan.mcn.model.vo.StarContractDetailVO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 红人签约合同明细 Mapper 接口
 * </p>
 *
 * @author wulg
 * @since 2023-10-25
 */
public interface StarContractDetailMapper extends EnhancedBaseMapper<StarContractDetail> {


    /**
     * 获取冲突的平台ID集合
     * @param starId
     * @return
     */
    List<Long> getConflictingStarPlatformIds(@Param("starId") Long starId);

    /**
     * 获取有效的红人签约合同
     * @param starId
     * @param starPlatformId
     * @param realPublishDate
     * @return
     */
    StarContractDetail getValidSignedContract(@Param("starId") Long starId, @Param("starPlatformId") Long starPlatformId, @Param("realPublishDate") Date realPublishDate);

    /**
     * 查询签约明细信息
     * @param detailIds
     * @return
     */
    List<StarContractDetailVO> getStarContractDetails(@Param("detailIds")  List<Long> detailIds);
}
